package edu.sctu.nieyu.day20150514.texttwo;

/**
 * Created by user01 on 2015/5/14.
 */
public class StudentOne extends Abstract{

    int sum;

    Message[] Array;

    public StudentOne(Message[] Array){
        super(Array);
        this.Array=Array;
    }

    @Override
    public void setInformation() {

        for (int i=0;i<Array.length;i++){
        if (Array[i].getAge()>25){
            System.out.println("姓名："+Array[i].getName()+"年龄："+Array[i].getAge()+"性别："+Array[i].getSex());
            sum++;
        }else{
            System.out.println("不符合条件");
        }
    }
        System.out.println("符合的人数："+sum);
    }
}
